package button
{
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	public class BtnState extends Sprite
	{
		public var btnLabel:TextField;
		public function BtnState(color:uint, color2:uint, btnLabelText:String)
		{
			btnLabel = new TextField();
			btnLabel.text = btnLabelText;
			btnLabel.x = 5;
			btnLabel.autoSize = "left";
			var format:TextFormat = new TextFormat("Verdana");
			format.size = 12;
			btnLabel.setTextFormat(format);
			var btnWidth:Number = btnLabel.textWidth + 10;
			var bkground:Shape = new Shape();
			bkground.graphics.beginFill(color);
			bkground.graphics.drawRect(0, 0, btnWidth, 18);
			bkground.graphics.endFill();
			addChild(bkground);
			addChild(btnLabel);
		}
	}
}